<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增订单')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncOrder-add">
			<input type="hidden" name="orderType" th:value="${orderType}"/>
			<input type="hidden" name="createTime" th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}"/>
			<div class="form-group">
				<label class="col-sm-3 control-label">订单号：</label>
				<div class="col-sm-8">
					<input id="orderCode" name="orderCode"  type="text" readonly="true" th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyyMMddHHmmss')}" class="form-control">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">时间：</label>
				<div class="col-sm-8">
					<input id="orderTime" name="orderTime"  th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}" class="time-input" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">经手人：</label>
				<div class="col-sm-8">
					<input id="createBy" name="createBy" class="form-control" type="text">
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">出库类型：</label>
				<div class="col-sm-8">
					<select name="outputType" class="form-control m-b" th:with="type=${@dict.getType('cforderType')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark"  class="form-control valid" type="text" rows="4"></textarea>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/ncOrder"
		$("#form-ncOrder-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-ncOrder-add').serialize());
	        }
	    }
	</script>
</body>
</html>
